<?php

/*
 * This file is part of ibrand/laravel-sms.
 *
 * (c) iBrand <https://www.ibrand.cc>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

return [
    'route' => [
        'prefix' => 'sms',
        'middleware' => ['api'],
    ],

    'easy_sms' => [
        'timeout' => 5.0,

        // 默认发送配置
        'default' => [
            // 网关调用策略，默认：顺序调用
            'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,

            // 默认可用的发送网关
            'gateways' => [
                'errorlog',
            ],
        ],

        // 可用的网关配置
        'gateways' => [
            'errorlog' => [
                'file' => storage_path('logs/laravel-sms.log'),
            ],

            'yunpian' => [
                'api_key' => '824f0ff2f71cab52936axxxxxxxxxx',
            ],

            'aliyun' => [
                'access_key_id' => 'xxxx',
                'access_key_secret' => 'xxxx',
                'sign_name' => '阿里云短信测试专用',
                'code_template_id' => 'SMS_802xxx',
            ],

            'alidayu' => [
                //...
            ],
            'chuanglan' => [
                'account' => env('SHANYAN_SMS_ACCOUNT', ''),
                'password' => env('SHANYAN_SMS_PASSWORD', ''),

                // 国际短信时必填
                'intel_account' => '',
                'intel_password' => '',

                // \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE  => 验证码通道（默认）
                // \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_PROMOTION_CODE => 会员营销通道
                'channel'  => \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE,

                // 会员营销通道 特定参数。创蓝规定：api提交营销短信的时候，需要自己加短信的签名及退订信息
                // 'sign' => '【通讯云】',
                // 'unsubscribe' => '回TD退订',
            ],
        ],
    ],

    'code' => [
        'length' => 6,
        'validMinutes' => 10,
        'maxAttempts' => 3,
    ],

    'data' => [
        'product' => '',
    ],

    'dblog' => true,

    'content' => '【your app signature】亲爱的用户，您的验证码是%s。有效期为%s分钟，请尽快验证。',
    // 签名
    'sign_name' => env('SMS_SIGN_NAME', ''),

    'storage' => \iBrand\Sms\Storage\CacheStorage::class,
];
